//
//  MyCATransition.h
//  风行电影
//
//  Created by qianfeng on 14-8-31.
//  Copyright (c) 2014年 XuRan. All rights reserved.
//

#import <QuartzCore/QuartzCore.h>
    // 转场动画
@interface MyCATransition : CATransition

//type
#define Fade @"fade"
#define MoveIn @"moveIn"
#define Push @"push"
#define Reveal @"reveal"
#define Cube @"cube"
#define SuckEffect @"suckEffect"
#define OglFlip @"oglFlip"
#define RippleEffect @"rippleEffect"
#define PageCurl @"pageCurl"
#define CameraIrisHollowOpen @"cameraIrisHollowOpen"
#define CameraIrisHollowClose @"cameraIrisHollowClose"

//subtype:
#define FromLeft @"fromLeft"
#define FromRight @"fromRight"
#define FromTop @"fromTop"
#define FromBottom @"fromBottom"

//时间
#define mDuration 1.5

//timingFunction
#define Linear @"linear"
#define EaseIn @"easeIn"
#define EaseOut @"easeOut"
#define EaseInEaseOut @"easeInEaseOut"

#define Animation @"animation"

// 自定义转场动画
+ (MyCATransition *)catransitionWithType:(NSString *)type subType:(NSString *)subType duration:(double)duration timingFunction:(NSString *)timingName;

// 参数说明：
/*
 type:
 `fade', 渐变 `moveIn' 进入, `push' 推出 `reveal'. 展现 cube 立方 suckEffect 吸收 oglFlip 上下翻转 rippleEffect  水滴 pageCurl 卷页 cameraIrisHollowOpen 开相机 cameraIrisHollowClose 关相机
 subtype:
 fromLeft', `fromRight', `fromTop' and
 `fromBottom'
 timingFunction:
 linear', `easeIn', `easeOut' and
 `easeInEaseOut'
 */
@end
